package cn.tedu.egmvc3.controller;

import cn.tedu.egmvc3.pojo.dto.Add;
import cn.tedu.egmvc3.pojo.dto.Id;
import cn.tedu.egmvc3.pojo.dto.Update;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AddressController {
    @RequestMapping("/address/add")
    @ResponseBody
    public String index(Add add){
        System.out.println(add);
        return "添加成功";
    }
    @RequestMapping("/address/update")
    @ResponseBody
    public String index(Update update){
        System.out.println(update);
        return "修改成功";
    }
    @RequestMapping("/address/delete")
    @ResponseBody
    public String index(Id id){
        System.out.println(id);
        return "删除成功";
    }
    @RequestMapping("/address/list")
    @ResponseBody
    public String index(){
        System.out.println();
        return "查询成功";
    }
}
